{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 载入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.rcParams['font.sans-serif'] = ['SimHei']\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "target_url = (\"http://archive.ics.uci.edu/ml/machine-\"\n",
    "              \"learning-databases/wine-quality/winequality-red.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>fixed acidity</th>\n",
       "      <th>volatile acidity</th>\n",
       "      <th>citric acid</th>\n",
       "      <th>residual sugar</th>\n",
       "      <th>chlorides</th>\n",
       "      <th>free sulfur dioxide</th>\n",
       "      <th>total sulfur dioxide</th>\n",
       "      <th>density</th>\n",
       "      <th>pH</th>\n",
       "      <th>sulphates</th>\n",
       "      <th>alcohol</th>\n",
       "      <th>quality</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7.4</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.9</td>\n",
       "      <td>0.076</td>\n",
       "      <td>11.0</td>\n",
       "      <td>34.0</td>\n",
       "      <td>0.9978</td>\n",
       "      <td>3.51</td>\n",
       "      <td>0.56</td>\n",
       "      <td>9.4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7.8</td>\n",
       "      <td>0.88</td>\n",
       "      <td>0.00</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.098</td>\n",
       "      <td>25.0</td>\n",
       "      <td>67.0</td>\n",
       "      <td>0.9968</td>\n",
       "      <td>3.20</td>\n",
       "      <td>0.68</td>\n",
       "      <td>9.8</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7.8</td>\n",
       "      <td>0.76</td>\n",
       "      <td>0.04</td>\n",
       "      <td>2.3</td>\n",
       "      <td>0.092</td>\n",
       "      <td>15.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>0.9970</td>\n",
       "      <td>3.26</td>\n",
       "      <td>0.65</td>\n",
       "      <td>9.8</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.2</td>\n",
       "      <td>0.28</td>\n",
       "      <td>0.56</td>\n",
       "      <td>1.9</td>\n",
       "      <td>0.075</td>\n",
       "      <td>17.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>0.9980</td>\n",
       "      <td>3.16</td>\n",
       "      <td>0.58</td>\n",
       "      <td>9.8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7.4</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.9</td>\n",
       "      <td>0.076</td>\n",
       "      <td>11.0</td>\n",
       "      <td>34.0</td>\n",
       "      <td>0.9978</td>\n",
       "      <td>3.51</td>\n",
       "      <td>0.56</td>\n",
       "      <td>9.4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   fixed acidity  volatile acidity  citric acid  residual sugar  chlorides  \\\n",
       "0            7.4              0.70         0.00             1.9      0.076   \n",
       "1            7.8              0.88         0.00             2.6      0.098   \n",
       "2            7.8              0.76         0.04             2.3      0.092   \n",
       "3           11.2              0.28         0.56             1.9      0.075   \n",
       "4            7.4              0.70         0.00             1.9      0.076   \n",
       "\n",
       "   free sulfur dioxide  total sulfur dioxide  density    pH  sulphates  \\\n",
       "0                 11.0                  34.0   0.9978  3.51       0.56   \n",
       "1                 25.0                  67.0   0.9968  3.20       0.68   \n",
       "2                 15.0                  54.0   0.9970  3.26       0.65   \n",
       "3                 17.0                  60.0   0.9980  3.16       0.58   \n",
       "4                 11.0                  34.0   0.9978  3.51       0.56   \n",
       "\n",
       "   alcohol  quality  \n",
       "0      9.4        5  \n",
       "1      9.8        5  \n",
       "2      9.8        5  \n",
       "3      9.8        6  \n",
       "4      9.4        5  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "columns_mapping = {\n",
    "    'fixed acidity': '非挥发性酸',\n",
    "    'volatile acidity': '挥发性酸',\n",
    "    'citric acid': '柠檬酸',\n",
    "    'residual sugar': '残留糖分',\n",
    "    'chlorides': '氯化物',\n",
    "    'free sulfur dioxide': '游离二氧化硫',\n",
    "    'total sulfur dioxide': '总二氧化硫',\n",
    "    'density': '密度',\n",
    "    'pH': 'PH值',\n",
    "    'sulphates': '亚硝酸盐',  # 百度翻译是：硫酸盐\n",
    "    'alcohol': '酒精含量',\n",
    "    'quality': '口感评分'\n",
    "}\n",
    "\n",
    "try:\n",
    "    df_wine = pd.read_csv(\"../../data/wine.csv\", header=0)\n",
    "except Exception as e:\n",
    "    print(e)\n",
    "    df_wine = pd.read_csv(target_url, sep=\";\",header=0, prefix=\"V\")\n",
    "    df_wine.columns = columns_mapping.keys()\n",
    "    df_wine.to_csv(\"../../data/wine.csv\", index=False)\n",
    "\n",
    "df_wine.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘制各指标元素的相关性热力图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>fixed acidity</th>\n",
       "      <th>volatile acidity</th>\n",
       "      <th>citric acid</th>\n",
       "      <th>residual sugar</th>\n",
       "      <th>chlorides</th>\n",
       "      <th>free sulfur dioxide</th>\n",
       "      <th>total sulfur dioxide</th>\n",
       "      <th>density</th>\n",
       "      <th>pH</th>\n",
       "      <th>sulphates</th>\n",
       "      <th>alcohol</th>\n",
       "      <th>quality</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>fixed acidity</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.256131</td>\n",
       "      <td>0.671703</td>\n",
       "      <td>0.114777</td>\n",
       "      <td>0.093705</td>\n",
       "      <td>-0.153794</td>\n",
       "      <td>-0.113181</td>\n",
       "      <td>0.668047</td>\n",
       "      <td>-0.682978</td>\n",
       "      <td>0.183006</td>\n",
       "      <td>-0.061668</td>\n",
       "      <td>0.124052</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>volatile acidity</th>\n",
       "      <td>-0.256131</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.552496</td>\n",
       "      <td>0.001918</td>\n",
       "      <td>0.061298</td>\n",
       "      <td>-0.010504</td>\n",
       "      <td>0.076470</td>\n",
       "      <td>0.022026</td>\n",
       "      <td>0.234937</td>\n",
       "      <td>-0.260987</td>\n",
       "      <td>-0.202288</td>\n",
       "      <td>-0.390558</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>citric acid</th>\n",
       "      <td>0.671703</td>\n",
       "      <td>-0.552496</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.143577</td>\n",
       "      <td>0.203823</td>\n",
       "      <td>-0.060978</td>\n",
       "      <td>0.035533</td>\n",
       "      <td>0.364947</td>\n",
       "      <td>-0.541904</td>\n",
       "      <td>0.312770</td>\n",
       "      <td>0.109903</td>\n",
       "      <td>0.226373</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>residual sugar</th>\n",
       "      <td>0.114777</td>\n",
       "      <td>0.001918</td>\n",
       "      <td>0.143577</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.055610</td>\n",
       "      <td>0.187049</td>\n",
       "      <td>0.203028</td>\n",
       "      <td>0.355283</td>\n",
       "      <td>-0.085652</td>\n",
       "      <td>0.005527</td>\n",
       "      <td>0.042075</td>\n",
       "      <td>0.013732</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>chlorides</th>\n",
       "      <td>0.093705</td>\n",
       "      <td>0.061298</td>\n",
       "      <td>0.203823</td>\n",
       "      <td>0.055610</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.005562</td>\n",
       "      <td>0.047400</td>\n",
       "      <td>0.200632</td>\n",
       "      <td>-0.265026</td>\n",
       "      <td>0.371260</td>\n",
       "      <td>-0.221141</td>\n",
       "      <td>-0.128907</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>free sulfur dioxide</th>\n",
       "      <td>-0.153794</td>\n",
       "      <td>-0.010504</td>\n",
       "      <td>-0.060978</td>\n",
       "      <td>0.187049</td>\n",
       "      <td>0.005562</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.667666</td>\n",
       "      <td>-0.021946</td>\n",
       "      <td>0.070377</td>\n",
       "      <td>0.051658</td>\n",
       "      <td>-0.069408</td>\n",
       "      <td>-0.050656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>total sulfur dioxide</th>\n",
       "      <td>-0.113181</td>\n",
       "      <td>0.076470</td>\n",
       "      <td>0.035533</td>\n",
       "      <td>0.203028</td>\n",
       "      <td>0.047400</td>\n",
       "      <td>0.667666</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.071269</td>\n",
       "      <td>-0.066495</td>\n",
       "      <td>0.042947</td>\n",
       "      <td>-0.205654</td>\n",
       "      <td>-0.185100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>density</th>\n",
       "      <td>0.668047</td>\n",
       "      <td>0.022026</td>\n",
       "      <td>0.364947</td>\n",
       "      <td>0.355283</td>\n",
       "      <td>0.200632</td>\n",
       "      <td>-0.021946</td>\n",
       "      <td>0.071269</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.341699</td>\n",
       "      <td>0.148506</td>\n",
       "      <td>-0.496180</td>\n",
       "      <td>-0.174919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>pH</th>\n",
       "      <td>-0.682978</td>\n",
       "      <td>0.234937</td>\n",
       "      <td>-0.541904</td>\n",
       "      <td>-0.085652</td>\n",
       "      <td>-0.265026</td>\n",
       "      <td>0.070377</td>\n",
       "      <td>-0.066495</td>\n",
       "      <td>-0.341699</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.196648</td>\n",
       "      <td>0.205633</td>\n",
       "      <td>-0.057731</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sulphates</th>\n",
       "      <td>0.183006</td>\n",
       "      <td>-0.260987</td>\n",
       "      <td>0.312770</td>\n",
       "      <td>0.005527</td>\n",
       "      <td>0.371260</td>\n",
       "      <td>0.051658</td>\n",
       "      <td>0.042947</td>\n",
       "      <td>0.148506</td>\n",
       "      <td>-0.196648</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.093595</td>\n",
       "      <td>0.251397</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>alcohol</th>\n",
       "      <td>-0.061668</td>\n",
       "      <td>-0.202288</td>\n",
       "      <td>0.109903</td>\n",
       "      <td>0.042075</td>\n",
       "      <td>-0.221141</td>\n",
       "      <td>-0.069408</td>\n",
       "      <td>-0.205654</td>\n",
       "      <td>-0.496180</td>\n",
       "      <td>0.205633</td>\n",
       "      <td>0.093595</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.476166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>quality</th>\n",
       "      <td>0.124052</td>\n",
       "      <td>-0.390558</td>\n",
       "      <td>0.226373</td>\n",
       "      <td>0.013732</td>\n",
       "      <td>-0.128907</td>\n",
       "      <td>-0.050656</td>\n",
       "      <td>-0.185100</td>\n",
       "      <td>-0.174919</td>\n",
       "      <td>-0.057731</td>\n",
       "      <td>0.251397</td>\n",
       "      <td>0.476166</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      fixed acidity  volatile acidity  citric acid  \\\n",
       "fixed acidity              1.000000         -0.256131     0.671703   \n",
       "volatile acidity          -0.256131          1.000000    -0.552496   \n",
       "citric acid                0.671703         -0.552496     1.000000   \n",
       "residual sugar             0.114777          0.001918     0.143577   \n",
       "chlorides                  0.093705          0.061298     0.203823   \n",
       "free sulfur dioxide       -0.153794         -0.010504    -0.060978   \n",
       "total sulfur dioxide      -0.113181          0.076470     0.035533   \n",
       "density                    0.668047          0.022026     0.364947   \n",
       "pH                        -0.682978          0.234937    -0.541904   \n",
       "sulphates                  0.183006         -0.260987     0.312770   \n",
       "alcohol                   -0.061668         -0.202288     0.109903   \n",
       "quality                    0.124052         -0.390558     0.226373   \n",
       "\n",
       "                      residual sugar  chlorides  free sulfur dioxide  \\\n",
       "fixed acidity               0.114777   0.093705            -0.153794   \n",
       "volatile acidity            0.001918   0.061298            -0.010504   \n",
       "citric acid                 0.143577   0.203823            -0.060978   \n",
       "residual sugar              1.000000   0.055610             0.187049   \n",
       "chlorides                   0.055610   1.000000             0.005562   \n",
       "free sulfur dioxide         0.187049   0.005562             1.000000   \n",
       "total sulfur dioxide        0.203028   0.047400             0.667666   \n",
       "density                     0.355283   0.200632            -0.021946   \n",
       "pH                         -0.085652  -0.265026             0.070377   \n",
       "sulphates                   0.005527   0.371260             0.051658   \n",
       "alcohol                     0.042075  -0.221141            -0.069408   \n",
       "quality                     0.013732  -0.128907            -0.050656   \n",
       "\n",
       "                      total sulfur dioxide   density        pH  sulphates  \\\n",
       "fixed acidity                    -0.113181  0.668047 -0.682978   0.183006   \n",
       "volatile acidity                  0.076470  0.022026  0.234937  -0.260987   \n",
       "citric acid                       0.035533  0.364947 -0.541904   0.312770   \n",
       "residual sugar                    0.203028  0.355283 -0.085652   0.005527   \n",
       "chlorides                         0.047400  0.200632 -0.265026   0.371260   \n",
       "free sulfur dioxide               0.667666 -0.021946  0.070377   0.051658   \n",
       "total sulfur dioxide              1.000000  0.071269 -0.066495   0.042947   \n",
       "density                           0.071269  1.000000 -0.341699   0.148506   \n",
       "pH                               -0.066495 -0.341699  1.000000  -0.196648   \n",
       "sulphates                         0.042947  0.148506 -0.196648   1.000000   \n",
       "alcohol                          -0.205654 -0.496180  0.205633   0.093595   \n",
       "quality                          -0.185100 -0.174919 -0.057731   0.251397   \n",
       "\n",
       "                       alcohol   quality  \n",
       "fixed acidity        -0.061668  0.124052  \n",
       "volatile acidity     -0.202288 -0.390558  \n",
       "citric acid           0.109903  0.226373  \n",
       "residual sugar        0.042075  0.013732  \n",
       "chlorides            -0.221141 -0.128907  \n",
       "free sulfur dioxide  -0.069408 -0.050656  \n",
       "total sulfur dioxide -0.205654 -0.185100  \n",
       "density              -0.496180 -0.174919  \n",
       "pH                    0.205633 -0.057731  \n",
       "sulphates             0.093595  0.251397  \n",
       "alcohol               1.000000  0.476166  \n",
       "quality               0.476166  1.000000  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_wine_corr_matrix = df_wine.corr()\n",
    "df_wine_corr_matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0YAAAHTCAYAAAADEAjBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3df6yld30n9vfHk7GZHdswYMeJG5t0FItdB+SEnSa4MWRAOI2VzUZxyBptFqqQdAAhsm211YJwinZFG9VNkbJubTFgsiiJ2DWV1g0NbLwp9dpBJlmPUrIBNjXq2qVGLgw2/tWA4d5P/5hDZjKaH8+9c87z3HnO6yUd+Tn3POc8n+Mzc+d+7vv7fJ7q7gAAAKyzC6YuAAAAYGoaIwAAYO1pjAAAgLWnMQIAANaexggAAFh7GiMAAGDtDWqMquqKqnpgsX11Vd1XVZ+qqsNVVastEQAAYLXO2hhV1b4kH0myd/GltyZ5e3e/LslVSV6xuvIAAAD+alhzmsd3V9XHq+rTVfWWrb7+kMRoI8ktSZ5Oku5+T3d/YfHYS5Ic3epBAQAAhjpFWHMq70xypLt/LMkbquqSrRzju862Q3c/vSjm5OJuSfK57v7yyc+pqkNJDiVJXXjh39z93d+9lZrOWxc9uTl1CaP65mXrs4rygm+uz3tNkvr21BWMp3dNXcG4Llijz3bdbK7Rn+XNPT11CaO68KL1+Yv7shd8feoSRnXkT795tLsvn7qOrfhPXru3v/bExtJf98iffvNzSb5xwpcOd/fhE+5/J6z5X87wMgeTvGuxfX+SA0n+96E1nLUxOpWq2p/kHyR5/akeX7yJw0ly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R1Xdl+SHqupDE9fD8nwxyf7F9oEk/u7Ox74kr6iqXUl+NInrcMyPn6lmanHO0UeTvOVUSRLjWtl1jKrq0iQPJPnfktyU5FU+8Hmoqrcn+W+TfHbxpTu7+59PWBIrUFX3dffBqetgORYna384x5bg7E7yhu5+7MzP4nxQVT+S5DdzbDndg0l+trufnbYqluE734er6qVJPpHkD5L8xzn2M9XGtNVxLk74bP+7HFvq/OeLh97b3f96wtLW2kov8Lrogm9Mcv9i+QYAAFtUVVfmWGr0+37RDKux0sYIAADgfODkPQAAYO1pjAAAgLWnMQIAANaexggAAFh7GiMAAGDt/f/y9Pm+ozU/fgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1152x576 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure(figsize=(16, 8))\n",
    "ax = fig.add_subplot(1, 1, 1)\n",
    "pic = ax.pcolor(df_wine_corr_matrix) #, cmap=plt.cm.RdBu)\n",
    "fig.colorbar(pic, ax=ax)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
